﻿
using System;
using System.Data;
using System.Data.SqlClient;
namespace Model
{
	
	/// <summary>	 
	/// 友情链接
	/// </summary>
	public class DbLinks
	{ 
		#region DbLinks
		/// <summary>
		/// 
		/// </summary>
		public DbLinks()
		{
		}
		/// <summary>	 
		/// 
		/// </summary>
		public DbLinks(Int32 lId)
		{
			this.lId = lId;
		
		}
		/// <summary>	 
		/// 
		/// </summary>		
		public DbLinks(DataRow dr)
		{
			int.TryParse(Convert.ToString(dr["lId"]),out lId);
			int.TryParse(Convert.ToString(dr["lType"]),out lType);
			this.lLogo = Convert.ToString(dr["lLogo"]);
			this.lTitle = Convert.ToString(dr["lTitle"]);
			this.lUrl = Convert.ToString(dr["lUrl"]);
			int.TryParse(Convert.ToString(dr["lViews"]),out lViews);
			if(dr["lAddTime"] != DBNull.Value)
				this.lAddTime = Convert.ToDateTime(dr["lAddTime"]);
			int.TryParse(Convert.ToString(dr["lFrom"]),out lFrom);
			
		}
		#endregion
		
		
		#region LId
		private Int32 lId;
		/// <summary>	 
		/// 
		/// AutoInc
		/// PK
		/// </summary>
		public Int32 LId
		{
			get{ return lId; }
			set{ lId= value; }
		}
		#endregion
		
		#region LType
		private Int32 lType;
		/// <summary>	 
		/// 友情链接类型
		/// 0-文字链接 1-图片链接
		/// </summary>
		public Int32 LType
		{
			get{ return lType; }
			set{ lType= value; }
		}
		#endregion
		
		#region LLogo
		private System.String lLogo;
		/// <summary>	 
		/// LOGO图片
		/// </summary>
		public System.String LLogo
		{
			get{ return lLogo; }
			set{ lLogo= value; }
		}
		#endregion
		
		#region LTitle
		private System.String lTitle;
		/// <summary>	 
		/// 标题
		/// </summary>
		public System.String LTitle
		{
			get{ return lTitle; }
			set{ lTitle= value; }
		}
		#endregion
		
		#region LUrl
		private System.String lUrl;
		/// <summary>	 
		/// 网址
		/// </summary>
		public System.String LUrl
		{
			get{ return lUrl; }
			set{ lUrl= value; }
		}
		#endregion
		
		#region LViews
		private Int32 lViews;
		/// <summary>	 
		/// 访问数
		/// </summary>
		public Int32 LViews
		{
			get{ return lViews; }
			set{ lViews= value; }
		}
		#endregion
		
		#region LAddTime
		private DateTime lAddTime;
		/// <summary>	 
		/// 添加时间
		/// </summary>
		public DateTime LAddTime
		{
			get{ return lAddTime; }
			set{ lAddTime= value; }
		}
		#endregion
		
		#region LFrom
		private Int32 lFrom;
		/// <summary>	 
		/// 链接类别
		/// 0-校内 1-校外
		/// </summary>
		public Int32 LFrom
		{
			get{ return lFrom; }
			set{ lFrom= value; }
		}
		#endregion

	}
}
